﻿<sap:ActivityDesigner x:Class="Active.Activities.ActivityDesigners.MessageBoxDesigner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
    xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
		xmlns:sapc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation" Height="Auto" Width="300">
	<sap:ActivityDesigner.Icon>
		<DrawingBrush>
			<DrawingBrush.Drawing>
				<ImageDrawing>
					<ImageDrawing.Rect>
						<Rect Location="0,0" Size="16,16" ></Rect>
					</ImageDrawing.Rect>
					<ImageDrawing.ImageSource>
						<BitmapImage UriSource="/Active.Activities;component/Resources/MessageBox.png"></BitmapImage>
					</ImageDrawing.ImageSource>
				</ImageDrawing>
			</DrawingBrush.Drawing>
		</DrawingBrush>
	</sap:ActivityDesigner.Icon>
	<sap:ActivityDesigner.Resources>
		<ResourceDictionary>
			<sapc:ArgumentToExpressionConverter x:Key="ArgumentToExpressionConverter" />
		</ResourceDictionary>
	</sap:ActivityDesigner.Resources>
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="*" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<sapv:ExpressionTextBox 
			HintText="The text to display on the messagebox" 
			Expression="{Binding Path=ModelItem.Text, Mode=TwoWay, Converter={StaticResource ResourceKey=ArgumentToExpressionConverter}}" 
			OwnerActivity="{Binding Path=ModelItem}" 
			Margin="67,5,5,5" 
			VerticalAlignment="Stretch"
			HorizontalAlignment="Stretch"></sapv:ExpressionTextBox>
		<sapv:ExpressionTextBox 
			HintText="The titlebar text of the message box" 
			Expression="{Binding Path=ModelItem.Caption, Mode=TwoWay, Converter={StaticResource ResourceKey=ArgumentToExpressionConverter}}" 
			OwnerActivity="{Binding Path=ModelItem}"
			Margin="67,5,5,5" 
			VerticalAlignment="Stretch"
			HorizontalAlignment="Stretch"
			Grid.Row="1"></sapv:ExpressionTextBox>
		<Label Content="Text :" Height="28" HorizontalAlignment="Left" Margin="5,3,0,0" VerticalAlignment="Top" />
		<Label Content="Caption :" Height="28" HorizontalAlignment="Left" Margin="5,3,0,0" VerticalAlignment="Top" Grid.Row="1" />
	</Grid>
</sap:ActivityDesigner>
